package com.tuling.code.jdk8.day01;

import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;

/**
 * java 8 流式处理
 * 
 * @author javaw
 *
 */
public class StreamUtil {
	
	// stream
	// replace
	// foreach
	
	public static <T, R> List<R> map(List<T> data, Function<T, R> mapFunc) {
		return data.stream().map(mapFunc).collect(Collectors.toList()); 
	}
}
